<%@page pageEncoding="utf-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<table width='100%' height='31' border='0' cellspacing='0'
		cellpadding='0'>
	<tr>
		<td width='40'
			background='${pageContext.request.contextPath}/common/images/index_26.jpg'>&nbsp;
			
		</td>
		<!--内容区导航开始-->
		<td align='left' valign='middle'
			background='${pageContext.request.contextPath}/common/images/ctitle_bak_center.jpg'>
			<span class="channel_title">图书分类管理
				<span style="color:#000;"> >> 新增图书类型信息  >></span> </span></td>
		<!--内容区导航结束-->
		<td align='left' valign='middle'
			background='${pageContext.request.contextPath}/common/images/ctitle_bak_center.jpg'>&nbsp;
		</td>
		<td width='13' align='right' valign='middle'
			background='${pageContext.request.contextPath}/common/images/ctitle_bak_center.jpg'>
			<img src="${pageContext.request.contextPath}/common/images/ctitle_bak_right.jpg" height="31" width="10">
		</td>
	</tr>
</table>

<table width='100%' height="339" border='0' cellspacing='0' cellpadding='0'>
	<tr align="center">
		<td>
			<form name="aform" action="${pageContext.request.contextPath}/sysManage/typeManage/type.do?method=addbooktype" method="post" onsubmit="return (checkName());">
				<table>
					<tr>
						<td><span style="fond-size:12px">类　    名：</span></td>
						<td><input id="typeName" name="typeName" type="text"></td>
						<td><div id="checkName"></div></td>
					</tr>
					
					<tr>
						<td><span style="fond-size:12px">上级类名：</span></td>
						<td><select id="p_id" name="p_id">
							<option value="0"></option>
							<c:forEach items="${bookTypes}" var="booktype">
								<option value="${booktype.id}">${booktype.typeName}</option>
							</c:forEach>
						</select> <span style="fond-size:12px">若无上级类则为空！</span>
						<td><div id="checkp_id"></div></td>
					</tr>
					<tr align="center">
						<td height='31'><input type="submit" value="添加"></td>
					 	<td><input type="reset" value="清空"></td>
					</tr>
				</table>
			</form>
		</td>
	</tr>
</table>
<script type="text/javascript">
	function checkName(){
		var typeName = document.getElementById('typeName').value;
		if(typeName==""){
			alert("分类名不能为空！");
			return false;
		}
	}
</script>